import java.util.Scanner;
public  class test31431 {
    public static void main(String[] args) {
        //输入机票的原价，当前的月份以及是头等舱还是经济舱
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入机票的原价");
        int ticket = sc.nextInt();
        System.out.println("请输入当前的月份");
        int month = sc.nextInt();
        System.out.println("请输入当前是经济仓还是头等仓 0头等舱 1经济舱");
        int seat = sc.nextInt();
        if (month <= 10 && month >= 5) {
            ticket = getprice(ticket, seat, 0.9, 0.85);
        }

        else if((month>0&&month<=4)||(month>=11&&month<=12))

    {
        ticket = getprice(ticket, seat, 0.7, 0.65);
    }
        else

    {
        System.out.println("输入有误");
    }
        System.out.println(ticket);
}
        public static int getprice(int ticket,int seat,double a,double b)
        {
            if(seat==0){
                ticket=(int)(ticket*a);
            }
            else if(seat==1){
                ticket=(int)(ticket*b);
            }
            else {
                System.out.println("错");
            }
            return ticket;
        }
    }
